package com.itlong.cloud.equip.smartcard;


import com.itlong.cloud.POJO.DTO.smartcard.SmartCardGetDeviceInfoDTO;
import com.itlong.cloud.POJO.DTO.smartcard.SmartCardSyncDeviceInfoDTO;
import com.itlong.cloud.POJO.PO.DeviceElevatorFloorConfigPO;
import com.itlong.cloud.POJO.VO.smartcard.SmartCardDeviceInfoVO;
import com.itlong.cloud.POJO.VO.smartcard.SmartCardFloorInfoVO;
import com.itlong.cloud.POJO.VO.smartcard.SmartCardOldDeviceInfoVO;
import com.itlong.cloud.POJO.VO.smartcard.SmartCardServerFloorRelationVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;

/**
 * <desc>
 *      一卡通设备数据同步接口.
 * </desc>
 *
 * @createDate 2017-12-27
 */
@FeignClient(name="equip-service")
public interface ISmartCardDeviceServiceClient {


    /**
     * <desc>
     *      一卡通保存或更新电梯楼层映射信息
     * <desc/>
     *
     * @param deviceElevatorFloorConfigPO 电梯楼层映射表
     * @return
     * @author LouisLewis
     * @createDate 2017-12-27
     */
    @RequestMapping(path = "/smartCard/syncData/saveOrUpdatefloorConfig", method = RequestMethod.POST)
    void saveOrUpdatefloorConfig(@RequestBody DeviceElevatorFloorConfigPO deviceElevatorFloorConfigPO) throws Exception;
    /**
     * <desc>
     *      一卡通更新设备信息。
     * <desc/>
     *
     * @param deviceInfoDTO 更新设备信息参数
     * @return
     * @author LouisLewis
     * @createDate 2017-12-27
     */
    @RequestMapping(path = "/smartCard/syncData/updateDeviceInfo", method = RequestMethod.POST)
    Integer updateDeviceInfo(@RequestBody SmartCardSyncDeviceInfoDTO deviceInfoDTO) throws Exception;


    /**
     * <desc>
     *      一卡通_添加设备。
     * <desc/>
     *
     * @param  deviceInfoDTO 设备信息
     * @return
     * @author LouisLewis
     * @createDate 2017-12-27
     */
    @RequestMapping(path = "/smartCard/syncData/addDeviceInfo", method = RequestMethod.POST)
    Integer addDeviceInfo(@RequestBody SmartCardSyncDeviceInfoDTO deviceInfoDTO) throws Exception;


    /**
     * <desc>
     *    查询一卡通通行记录相关的设备信息.
     * </desc>
     *
     * @param  getDeviceInfoDTO 查询条件
     * @return 设备信息
     * @author LewisLouis
     * @createDate 2018-01-23
     */
    @RequestMapping(path = "/smartCard/syncData/getDeviceInfos", method = RequestMethod.POST)
    List<SmartCardDeviceInfoVO> getDeviceInfos(@RequestBody SmartCardGetDeviceInfoDTO getDeviceInfoDTO) throws Exception;



    /**
     * <desc>
     *      设备变更或电梯楼层对应表变更，按项目需通知更新APP_USR的缓存. （慎用！！！）
     * </desc>
     *
     * @param  projectId 项目Id
     * @return xx
     * @author LewisLouis
     * @createDate 2017-12-29
     */
    @RequestMapping(path = "/smartCard/syncData/sendMessageForDeviceChanged", method = RequestMethod.POST)
    void sendMessageForDeviceChanged(@RequestParam("projectId") String projectId) throws Exception;

    /**
     * <desc>
     *      根据项目编号获取云电梯信息
     * </desc>
     *
     * @param  projectId 项目Id
     * @return 云电梯信息
     * @author Qiang.S
     * @createDate 2019-01-26
     */
    @RequestMapping(path = "/smartCard/syncdata/device/elevator/getCloudElevatorList", method = RequestMethod.POST)
    List<SmartCardOldDeviceInfoVO> getCloudElevatorList(@RequestParam("projectId") String projectId) throws Exception;

    /**
     * <desc>
     *     获取云电梯楼层映射表信息
     * <desc/>
     *
     * @param deviceUnique 设备唯一编号
     * @return
     * @author Qiang.S
     * @createDate 2019-01-26
     */
    @RequestMapping(path = "/smartCard/syncdata/device/elevator/getElevatorFloorConfig", method = RequestMethod.POST)
    SmartCardFloorInfoVO getElevatorFloorConfig(@RequestParam("deviceUnique") String deviceUnique) throws Exception;

    /**
     * <desc>
     *      一卡通获取楼层映射表
     * </desc>
     *
     * @param deviceUnique
     * @return
     * @author Jiaqi.X
     * @createDate 2019/03/29
     */
    @RequestMapping(path = "/smartCard/syncdata/device/elevator/getSmartCardServerFloorRelation", method = RequestMethod.POST)
    List<SmartCardServerFloorRelationVO> getSmartCardServerFloorRelation(@RequestParam("deviceUnique") String deviceUnique);

    /**
     * <desc>
     *      一卡通获取楼层映射表
     * </desc>
     *
     * @param deviceUnique
     * @return
     * @author Jiaqi.X
     * @createDate 2019/03/29
     */
    @RequestMapping(path = "/smartCard/syncdata/device/elevator/checkDeviceIsOnline", method = RequestMethod.POST)
    Integer checkDeviceIsOnline(@RequestParam("deviceUnique") String deviceUnique);

    /**
     * <desc>
     *      获取所有设备
     * </desc>
     *
     * @param projectId
     * @return
     * @createDate 2019/11/25
     * @author Jiaqi.X
     */
    @RequestMapping(path = "/smartCard/syncdata/device/elevator/getAllDevice", method = RequestMethod.POST)
    Map<String,Object> getAllDevice(@RequestParam("projectId") String projectId);
}
